package app.server.project.main.service.service.task.verify;

import app.server.project.main.service.bo.event.TaskFinishEvent;
import app.server.project.main.service.service.task.ITaskVerify;
import app.server.project.main.service.service.task.VerifyType;
import lombok.AllArgsConstructor;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

@AllArgsConstructor
@Component(VerifyType.Package_Name + VerifyType.Telegram)
public class TGVerify implements ITaskVerify {

    private ApplicationEventPublisher applicationEventPublisher;

    @Override
    public void doLogic(int taskId, long userId) {
        this.applicationEventPublisher.publishEvent(TaskFinishEvent.of(userId, VerifyType.Telegram, 1));
    }
}
